package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DataModelTypeMapper;
import com.ruoyi.system.domain.DataModelType;
import com.ruoyi.system.service.IDataModelTypeService;

/**
 * 模型类别管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class DataModelTypeServiceImpl implements IDataModelTypeService 
{
    @Autowired
    private DataModelTypeMapper dataModelTypeMapper;

    /**
     * 查询模型类别管理
     * 
     * @param modelTypeId 模型类别管理主键
     * @return 模型类别管理
     */
    @Override
    public DataModelType selectDataModelTypeByModelTypeId(Long modelTypeId)
    {
        return dataModelTypeMapper.selectDataModelTypeByModelTypeId(modelTypeId);
    }

    /**
     * 查询模型类别管理列表
     * 
     * @param dataModelType 模型类别管理
     * @return 模型类别管理
     */
    @Override
    public List<DataModelType> selectDataModelTypeList(DataModelType dataModelType)
    {
        return dataModelTypeMapper.selectDataModelTypeList(dataModelType);
    }

    /**
     * 新增模型类别管理
     * 
     * @param dataModelType 模型类别管理
     * @return 结果
     */
    @Override
    public int insertDataModelType(DataModelType dataModelType)
    {
        dataModelType.setCreateTime(DateUtils.getNowDate());
        return dataModelTypeMapper.insertDataModelType(dataModelType);
    }

    /**
     * 修改模型类别管理
     * 
     * @param dataModelType 模型类别管理
     * @return 结果
     */
    @Override
    public int updateDataModelType(DataModelType dataModelType)
    {
        dataModelType.setUpdateTime(DateUtils.getNowDate());
        return dataModelTypeMapper.updateDataModelType(dataModelType);
    }

    /**
     * 批量删除模型类别管理
     * 
     * @param modelTypeIds 需要删除的模型类别管理主键
     * @return 结果
     */
    @Override
    public int deleteDataModelTypeByModelTypeIds(Long[] modelTypeIds)
    {
        return dataModelTypeMapper.deleteDataModelTypeByModelTypeIds(modelTypeIds);
    }

    /**
     * 删除模型类别管理信息
     * 
     * @param modelTypeId 模型类别管理主键
     * @return 结果
     */
    @Override
    public int deleteDataModelTypeByModelTypeId(Long modelTypeId)
    {
        return dataModelTypeMapper.deleteDataModelTypeByModelTypeId(modelTypeId);
    }
}
